package com.kaifamiao.anno;

import java.util.Arrays;

public class Test {

    public static void main(String[] args) {
        Class<Demo> demoClass = Demo.class;

//        System.out.println(demoClass.isAnnotationPresent(Stu.class));
        Stu annotation = demoClass.getAnnotation(Stu.class);

        System.out.println(annotation.value());
        System.out.println(annotation.gender());
        System.out.println(Arrays.toString(annotation.books()));
//        Stu annotation1 = demoClass.getDeclaredAnnotation(Stu.class);
//        System.out.println(annotation);
//        System.out.println(annotation1);

//        Annotation[] annotations = demoClass.getAnnotations();
//
//        for (Annotation annotation : annotations){
//            System.out.println(annotation);
//        }
    }
}
